package com.gopay.cashier.domain.bean;

import org.apache.commons.lang.StringUtils;

import java.io.Serializable;

/**
 * Created by HJY on 2015/5/11.
 */
public class ExpressCardInfo implements Serializable {

    private Integer cardId;
    private String exPayBankCode;
    private String exPayChannel;
    private String bankCardNo;
    private String exValidDate;
    private String exHolder;
    private String exIdCardNo;
    private String exMobileNo;
    private String hideBankCardNo;

    public String getExPayBankCode() {
        return exPayBankCode;
    }

    public void setExPayBankCode(String exPayBankCode) {
        this.exPayBankCode = exPayBankCode;
    }

    public String getExPayChannel() {
        return exPayChannel;
    }

    public void setExPayChannel(String exPayChannel) {
        this.exPayChannel = exPayChannel;
    }

    public String getBankCardNo() {
        return bankCardNo;
    }

    public void setBankCardNo(String bankCardNo) {
        this.bankCardNo = bankCardNo;
    }

    public String getExValidDate() {
        return exValidDate;
    }

    public void setExValidDate(String exValidDate) {
        this.exValidDate = exValidDate;
    }

    public String getExHolder() {
        return exHolder;
    }

    public void setExHolder(String exHolder) {
        this.exHolder = exHolder;
    }

    public String getExIdCardNo() {
        return exIdCardNo;
    }

    public void setExIdCardNo(String exIdCardNo) {
        this.exIdCardNo = exIdCardNo;
    }

    public String getExMobileNo() {
        return exMobileNo;
    }

    public void setExMobileNo(String exMobileNo) {
        this.exMobileNo = exMobileNo;
    }

    public String getHideBankCardNo() {
        String cardNo = this.getBankCardNo();
        if(StringUtils.isNotEmpty(cardNo)){
            return "**".concat(cardNo.substring(cardNo.length() - 4, cardNo.length()));
        }
        return hideBankCardNo;
    }

    public void setHideBankCardNo(String hideBankCardNo) {
        this.hideBankCardNo = hideBankCardNo;
    }

    public Integer getCardId() {
        return cardId;
    }

    public void setCardId(Integer cardId) {
        this.cardId = cardId;
    }
}
